<p class='demo'>hello JavaScript</p>

<script>
    const text = document.getElementsByClassName("demo")[0].innerText;
    console.log(text);
</script>
